package com.bjsxt.livegoods.order.client.controller;

import com.bjsxt.livegoods.entity.Order;
import com.bjsxt.livegoods.order.client.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    @GetMapping
    @CrossOrigin
    public List<Order> findOrders(String user){
        return orderService.findOrders(user);
    }
}
